<template>
  <h2>我是About的内容</h2>
</template>

<script>
  export default {
    name: "About",
    /* beforeDestroy() {
  		console.log('About组件即将被销毁了')
  	},*/
    /* mounted() {
  		console.log('About组件挂载完毕了',this)
  		window.aboutRoute = this.$route
  		window.aboutRouter = this.$router
  	},  */
    beforeRouteEnter(to, from, next) {
      // 通过路由规则进入该组件调用
	  if (to.meta.control) {
              if (localStorage.getItem("school") === "swpu") {
                next()
              } else {
                alert("无权查看，请登录")
              }
            } else {
              next()
            }
    },
    beforeRouteLeave(to, from, next) {
      // 通过路由规则离开该组件调用
	  next()
    },
  }
</script>
